package p200;

import java.util.Arrays;
import java.util.stream.Collectors;

public class Leetcode_217 {
    public boolean containsDuplicate(int[] nums) {
        return Arrays.stream(nums).boxed().collect(Collectors.groupingBy(Integer::intValue, Collectors.counting())).values().stream().anyMatch(v -> v > 1);
    }

    public static void main(String[] args) {

    }
}
